From 1fa8d8281371db25ef9382b6087b7f3c0db73fe3 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 19 Jan 2022 14:45:06 +0100
Subject: refactor(config): move defaultLocale as property of config.locales

I will need the country code, so I think it makes more sense to gather
them inside the same property.
---
 src/pages/article/[slug].tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/pages/article/[slug].tsx')

diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx
index 8c345b7..70a12dc 100644
--- a/src/pages/article/[slug].tsx
+++ b/src/pages/article/[slug].tsx
@@ -43,7 +43,7 @@ const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => {
   };
 
   const router = useRouter();
-  const locale = router.locale ? router.locale : config.defaultLocale;
+  const locale = router.locale ? router.locale : config.locales.defaultLocale;
 
   useEffect(() => {
     addPrismClasses();
@@ -97,7 +97,7 @@ const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => {
     discussionUrl: `${config.url}${router.asPath}/#comments`,
     editor: { '@id': `${config.url}/#branding` },
     image: featuredImage?.sourceUrl,
-    inLanguage: config.defaultLocale,
+    inLanguage: config.locales.defaultLocale,
     isPartOf: {
       '@id': `${config.url}/blog`,
     },
-- 
cgit v1.2.3

